<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>not</title>
    <style>
         li:not(:first-child){
             background-color: green;
         }

         li:not(:last-child){
             background-color: red;
         }

         li:not(:nth-child(2)){
              background-color: greenyellow;
         }

         /**
            过滤器 -- filter
            管道模式
         */
         li:not(:first-child):not(:last-child){
              background-color: aqua;
         }
    </style>
</head>
<body>


<ul>
    <li>item1</li>
    <li>item2</li>
    <li>item3</li>
</ul>

</body>
</html>